package com.macken.zjh.network;

import com.game.BaseResponse;
import com.game.ResponseParser;
import com.macken.zjh.constant.CMD;
import com.macken.zjh.network.res.ActionResponse;
import com.macken.zjh.network.res.DeskResponse;
import com.macken.zjh.network.res.SendResponse;

public class ResponseFactory implements ResponseParser {

	@Override
	public BaseResponse create(short cmd) {
		BaseResponse response = null;
		switch (cmd) {
		case CMD.RES_DESK:
			response = new DeskResponse(cmd);
			break;
		case CMD.RES_ACTION:
			response = new ActionResponse(cmd);
			break;
		case CMD.RES_SEND:
			response = new SendResponse(cmd);
		default:
			break;
		}
		return response;
	}

}
